using System;
using System.Collections;
using System.Collections.Generic;

using MemberMgr.Data.Base;

namespace MemberMgr.Data.BusinessObjects
{
    public partial class tConsumptionMaster : BusinessBase<uint>
    {
        #region Declarations

		private decimal _sum = default(Decimal);
		private System.DateTime _costtime = new DateTime();
		private string _costaddress = String.Empty;
		private string _costcut = String.Empty;
		private decimal _costpoint = default(Decimal);
		
		private tMember _tMember = null;
		private tShop _tShop = null;
		
		private IList<tConsumptionDetail> _tConsumptionDetails = new List<tConsumptionDetail>();
		
		#endregion

        #region Constructors

        public tConsumptionMaster() { }

        #endregion

        #region Methods

        public override int GetHashCode()
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            
            sb.Append(this.GetType().FullName);
			sb.Append(_sum);
			sb.Append(_costtime);
			sb.Append(_costaddress);
			sb.Append(_costcut);
			sb.Append(_costpoint);

            return sb.ToString().GetHashCode();
        }

        #endregion

        #region Properties

		public virtual decimal Sum
        {
            get { return _sum; }
			set
			{
				OnSumChanging();
				_sum = value;
				OnSumChanged();
			}
        }
		partial void OnSumChanging();
		partial void OnSumChanged();
		
		public virtual System.DateTime Costtime
        {
            get { return _costtime; }
			set
			{
				OnCosttimeChanging();
				_costtime = value;
				OnCosttimeChanged();
			}
        }
		partial void OnCosttimeChanging();
		partial void OnCosttimeChanged();
		
		public virtual string Costaddress
        {
            get { return _costaddress; }
			set
			{
				OnCostaddressChanging();
				_costaddress = value;
				OnCostaddressChanged();
			}
        }
		partial void OnCostaddressChanging();
		partial void OnCostaddressChanged();
		
		public virtual string Costcut
        {
            get { return _costcut; }
			set
			{
				OnCostcutChanging();
				_costcut = value;
				OnCostcutChanged();
			}
        }
		partial void OnCostcutChanging();
		partial void OnCostcutChanged();
		
		public virtual decimal Costpoint
        {
            get { return _costpoint; }
			set
			{
				OnCostpointChanging();
				_costpoint = value;
				OnCostpointChanged();
			}
        }
		partial void OnCostpointChanging();
		partial void OnCostpointChanged();
		
		public virtual tMember TMember
        {
            get { return _tMember; }
			set
			{
				OnTMemberChanging();
				_tMember = value;
				OnTMemberChanged();
			}
        }
		partial void OnTMemberChanging();
		partial void OnTMemberChanged();
		
		public virtual tShop TShop
        {
            get { return _tShop; }
			set
			{
				OnTShopChanging();
				_tShop = value;
				OnTShopChanged();
			}
        }
		partial void OnTShopChanging();
		partial void OnTShopChanged();
		
		public virtual IList<tConsumptionDetail> TConsumptionDetails
        {
            get { return _tConsumptionDetails; }
            set
			{
				OnTConsumptionDetailsChanging();
				_tConsumptionDetails = value;
				OnTConsumptionDetailsChanged();
			}
        }
		partial void OnTConsumptionDetailsChanging();
		partial void OnTConsumptionDetailsChanged();
		
        #endregion
    }
}
